package org.hawk.gwt.ppc.parser;

/**
 * Provides introspection information about method name and attributes 
 * and instructions in the method body.
 * 
 * @author alex.bereznevatiy@gmail.com
 *
 */
public interface MethodDescriptor extends 
		DescriptorContainer, 
		ModificatedDescriptor,
		ParameterizedMemberDescriptor,
		AnnotatedDescriptor {

	/**
	 * @return name of this method.
	 */
	String getName();
	
	/**
	 * @return method body or <code>null</code> if method is abstract. 
	 */
	BlockDescriptor getBody();
	
	/**
	 * @return name of type specified as return type of this method.
	 * Never <code>null</code>. 
	 */
	String getReturnType();
	
	/**
	 * @return String representing type parameters of this method.
	 * If type parameters are absent - returns empty string.
	 */
	String getTypeParameters();
	
	/**
	 * @return for annotation method return default expression assigned to it.
	 * If there is no default value or method is not belongs to annotation
	 * returns <code>null</code>.
	 */
	ExpressionDescriptor getDefault();
}
